package com.hdax.easybuy.controller;

import com.hdax.easybuy.dao.NewsDao;
import com.hdax.easybuy.entity.News;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/providerNews")
public class NewsProviderController {

    @Resource
    private NewsDao newsDao;

    @RequestMapping("/queryNewsAll")
    public List<News> getAllNews(){

        return newsDao.findAll();
    }
}
